package it.struts.helloworld.form;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

public class OrdineForm extends ActionForm {

	/**
	 * 
	 */
	private static final long serialVersionUID = -988689922456632601L;
	
//	Variables for form processing
	private String action;

	private String actionUpdateData;

	/** identifier field */
	private String data;
	private String stato;
	private Double prezzoTot;
	private Integer quantitaTot;

	/**
	 * Reset all properties to their default values.
	 *
	 * @param mapping The mapping used to select this instance
	 * @param request The servlet request we are processing
	 */
	public void reset(ActionMapping mapping, HttpServletRequest request) {


		this.data = null;
		this.stato = null;
		this.prezzoTot =null;
		this.quantitaTot = null;

		this.action = "add";
		this.actionUpdateData = "";
	}
	/**
	 * Validate the properties posted in this request. If validation errors are
	 * found, return an <code>ActionErrors</code> object containing the errors.
	 * If no validation errors occur, return <code>null</code> or an empty
	 * <code>ActionErrors</code> object.
	 *
	 * @param mapping The current mapping (from struts-config.xml)
	 * @param request The servlet request object
	 */
	public ActionErrors validate(ActionMapping mapping,
			HttpServletRequest request) {
		ActionErrors errors = new ActionErrors();
		return errors;
	}

	public String getAction() {
		return action;
	}

	public void setAction(String action) {
		this.action = action;
	}

	public String getActionUpdateData() {
		return actionUpdateData;
	}

	public void setActionUpdateData(String actionUpdateData) {
		this.actionUpdateData = actionUpdateData;
	}
	public String getData() {
		return data;
	}
	public void setData(String data) {
		this.data = data;
	}
	public String getStato() {
		return stato;
	}
	public void setStato(String stato) {
		this.stato = stato;
	}
	public Double getPrezzoTot() {
		return prezzoTot;
	}
	public void setPrezzoTot(Double prezzoTot) {
		this.prezzoTot = prezzoTot;
	}
	public Integer getQuantitaTot() {
		return quantitaTot;
	}
	public void setQuantitaTot(Integer quantitaTot) {
		this.quantitaTot = quantitaTot;
	}
	
	

}
